﻿<%@ Page Title="" Language="C#" MasterPageFile="~/rightContent.Master" AutoEventWireup="true"
    CodeBehind="sheetView.aspx.cs" Inherits="WEB.sheetInfo.sheetView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="title" runat="server">
    委托单查看
</asp:Content>


<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
   
   <script type="text/javascript">
       
       var prevselitem = null;
       function selectx(row) {
           if (prevselitem != null) {
               prevselitem.style.backgroundColor = '#ffffff';
           }
           row.style.backgroundColor = '#99FF66';
           prevselitem = row;

       }
 </script>
    <table style="width: 100%;">
        <tr height="30px">
            <td>
            </td>
        </tr>
        <tr>
            <td>
                <table >
                    <tr>
                        <td width="200px">
                            &nbsp;
                        </td>
                        <td align="right">
                            时间范围：
                        </td>
                        <td align="left">
                            <asp:TextBox ID="tbTimestart" runat="server" class="Wdate"></asp:TextBox>
                            至<asp:TextBox ID="tbTimestop" runat="server" class="Wdate"></asp:TextBox>
                            <asp:DropDownList ID="ddlasc" runat="server" 
                                onselectedindexchanged="ddlasc_SelectedIndexChanged">
                                <asp:ListItem Value="desc">降序</asp:ListItem>
                                <asp:ListItem Value="asc">升序</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td width="200px">
                            &nbsp;
                        </td>
                        <td align="right">
                            <asp:DropDownList ID="ddlQuery" runat="server" Style="text-align: right" Width="101px">
                                <asp:ListItem Value="CustomerName">客户名</asp:ListItem>
                                <asp:ListItem Value="ladingBillNO">提单号</asp:ListItem>
                                <asp:ListItem Value="goodsName">货物名称</asp:ListItem>
                                <asp:ListItem Value="shipname">船名</asp:ListItem>
                                <asp:ListItem Value="filingNO">归档号</asp:ListItem>
                                <asp:ListItem Value="inspectionNo">报检单号</asp:ListItem>
                                <asp:ListItem Value="customsNo">报关单号</asp:ListItem>
                                <asp:ListItem Value="sheetID">委托单单号</asp:ListItem>
                                <asp:ListItem Value="c.codename">货物类别</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="tbQuery" runat="server" Width="320px"></asp:TextBox>
                            <asp:Button ID="btnQuery" runat="server" Text="  查 询" OnClick="btnQuery_Click" CssClass="Submit_Query" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <asp:GridView ID="gvSheetInfo" runat="server" CellPadding="4" CssClass="distance"
                    DataKeyNames="sheetID" OnRowEditing="gvSheetInfo_RowEditing" Style="text-align: center"
                    AutoGenerateColumns="False" OnRowCommand="gvSheetInfo_RowCommand" OnRowDataBound="gvSheetInfo_RowDataBound"

                    AllowPaging="True" OnPageIndexChanging="gvSheetInfo_PageIndexChanging"

                    Width="1300px" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"
                    ForeColor="Black" GridLines="Vertical" PageSize="50" 
                    onselectedindexchanged="gvSheetInfo_SelectedIndexChanged">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:BoundField DataField="sheetID" HeaderText="单号">
                            <HeaderStyle Width="25px" />
                        </asp:BoundField>
                        <asp:TemplateField>
                            <ItemTemplate>
                             
                                <asp:Button ID="Button4" runat="server" CausesValidation="false" 
                                    CommandArgument='<%# Eval("sheetID") %>' CommandName="" CssClass="Submit_gv" 
                                    onclick="Del_Click" OnClientClick="return confirm('是否确认删除？')" Text="删除" />
                                <asp:Button ID="Button2" runat="server" Text="查看" CommandArgument='<%# Eval("sheetID") %>'     CommandName="check" CssClass="Submit_yellow" 
                                    onclick="check_Click" Height="28" PostBackUrl="" 
                                    oncommand="Button2_Command"/>
                                <asp:Button ID="Button3" runat="server" Text="查看工作流" 
                                    CommandName="workflowView"  CommandArgument='<%# Eval("sheetID") %>'  CssClass="Submit_yellowbig" 
                                    onclick="workflow_Click"  Width ="90" oncommand="Button3_Command" 
                                    Visible="False"/>
                                
                             
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                      
                   
                        <asp:ButtonField ButtonType="Button" CommandName="sheetid" Text="查看" 
                            Visible="False">
<ControlStyle CssClass="Submit_gv"></ControlStyle>

                            <HeaderStyle Width="30px" />
                        </asp:ButtonField>
                        <asp:CommandField ShowEditButton="True" ButtonType="Button" Visible="False">
<ControlStyle CssClass="Submit_gv "></ControlStyle>

                            <HeaderStyle Width="30px" />
                        </asp:CommandField>
                        <asp:ButtonField ButtonType="Button" CommandName="workflowView" Text="查看工作流" 
                            ControlStyle-CssClass="Submit_gvbig" Visible="False">
                            <ControlStyle CssClass="Submit_gvbig"></ControlStyle>
                            <HeaderStyle Width="70px" />
                        </asp:ButtonField>
                        <asp:TemplateField ShowHeader="False" Visible="False">
                            <ItemTemplate>
                                <asp:Button ID="Button1" runat="server" CausesValidation="false" CommandName="" 
                                    CssClass="Submit_gv" onclick="Del_Click" OnClientClick="return confirm('是否确认删除？')"
                                    CommandArgument='<%# Eval("sheetID") %>' Text="删除" />
                            </ItemTemplate>
                            <HeaderStyle Width="30px" />
                            <ItemStyle Width="40px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="codeName" HeaderText="货物类型">
                            <HeaderStyle Width="50px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="agencyDate" HeaderText="日期" DataFormatString="{0:d}">
                        <ItemStyle Width="75px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CustomerName" HeaderText="客户">
                            <HeaderStyle Width="90px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="codeName1" HeaderText="进出口">
                            <HeaderStyle Width="60px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="typeID" HeaderText="类型">
                            <HeaderStyle Width="60px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="shipName" HeaderText="船名">
                            <HeaderStyle Width="50px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="goodsName" HeaderText="货物名称">
                            <HeaderStyle Width="45px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="No" HeaderText="数量">
                            <HeaderStyle Width="35px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="ladingBillNo" HeaderText="提单号">
                        <HeaderStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="customsNo" HeaderText="报关单号">
                        <HeaderStyle Width="75px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="contractNo" HeaderText="合同号">
                        <HeaderStyle Width="85px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="filingNO" HeaderText="归档号">
                            <HeaderStyle Width="55px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="jobNamebg" HeaderText="报关岗位">
                            <HeaderStyle Width="65px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="UserNamebg" HeaderText="报关处理员">
                            <HeaderStyle Width="70px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="busNamebg" HeaderText="当前环节">
                            <HeaderStyle Width="65px" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="处理及时度" Visible="False">
                            <ItemTemplate>
                                <asp:Image Width="32px" Height="32px" ID="ImgIntime" runat="server" />
                            </ItemTemplate>
                            <HeaderStyle Width="65px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="jobNamebj" HeaderText="报检岗位" Visible="False">
                            <HeaderStyle Width="65px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="UserNamebj" HeaderText="报检处理员" Visible="False">
                            <HeaderStyle Width="50px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="busNamebj" HeaderText="当前环节" Visible="False">
                            <HeaderStyle Width="50px" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="处理及时度" Visible="False">
                            <ItemTemplate>
                                <asp:Image ID="Imgtimebj" runat="server" Height="32px" Width="32px" />
                            </ItemTemplate>
                            <HeaderStyle Width="50px" />
                        </asp:TemplateField>
                         <asp:ButtonField ButtonType="Button" 
                            CommandName="sheetViewS" Text="费用录入" ControlStyle-CssClass="Submit_gvbig" 
                            Visible="False">
                            <ControlStyle CssClass="Submit_gvbig"></ControlStyle>
                            <HeaderStyle Width="70px" />
                        </asp:ButtonField>         
                        
                      
                   
                     </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" Height="30px" />
                   
                 
                    <PagerTemplate>
                        <br />
                        <asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)Container.NamingContainer).PageIndex + 1)  + "页/共" + (((GridView)Container.NamingContainer).PageCount) + "页" %> '></asp:Label>
                        <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                            CommandName="Page" CommandArgument="First"></asp:LinkButton>
                        <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                            CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                        <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                            CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                        <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                            CommandName="Page" CommandArgument="Last"></asp:LinkButton>
                        到第<asp:TextBox runat="server" ID="inPageNum" Width="30px"></asp:TextBox>页
                        <asp:Button ID="Button1" CommandName="go" Text="GO" runat="server" />
                        <br />
                    </PagerTemplate>
                    
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Left" />
                    <RowStyle BackColor="#F7F7DE" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />

<SortedAscendingCellStyle BackColor="#FBFBF2"></SortedAscendingCellStyle>

<SortedAscendingHeaderStyle BackColor="#848384"></SortedAscendingHeaderStyle>

<SortedDescendingCellStyle BackColor="#EAEAD3"></SortedDescendingCellStyle>

<SortedDescendingHeaderStyle BackColor="#575357"></SortedDescendingHeaderStyle>
               
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
